<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>个人注册</title>
		<link rel="stylesheet" href="css/register1.css">
	<script>
		var boolean;
		function check () {
			var name = document.getElementById("name").value;
			var password = document.getElementById("password").value;
			var password1 = document.getElementById("password1").value;
			var age = document.getElementById("age").value;
			var kg = document.getElementById("kg").value;
			if (name.length == 0) {
				boolean = false;
			}else if (password.length < 8 ){
				boolean = false;
			}else if (password1.length < 8 ){
				boolean = false;
			}else if (password != password1){
				boolean = false;
			}else if (age <18 ){
				boolean = false;
			}else if (kg<35||kg>150 ){
				boolean = false;
			}else{
				boolean=true;
			}			
			if(boolean){
				alert("注册成功");
			}else{
				alert("注册失败");
			}
		}
	</script>
		<meta charset="utf-8">
		<title>注册界面</title>
	</head>
	<body>
		<div class="w">
			<div class="header">
				<div class="logo">
					<!-- <img src="img/huashui1.jpeg" width="120" height="60"/> -->
				</div>
			</div>
			<div class="registerarea">
				<h3>
					注册新用户
					<em>我有账号去<a href="Login.htm">登录</a></em>
				</h3>
				<div class="reg_form">
					<ul>
						<li><label for="">姓名:</label><input type="text" name="name" id="name" class="inp" /></li>
						<li><label for="">密码:</label><input type="text" name="password" id="password" class="inp" /></li>
						<li><label for="">确认密码:</label><input type="text" name="password1" id="password1" class="inp" /></li>
						<li><label for="">年龄:</label><input type="text" name="age" id="age" class="inp" /></li>
						<li><label for="">体重:</label><input type="text" name="kg" id="kg" class="inp" /></li>
						<li><label for="">邮箱:</label><input type="text" name="mail" id="mail" class="inp" /></li>
						<li class="ag"><input type="checkbox" name="" id="" value="" />同意协议并注册
						<a href="#">xx用户协议</a></li>
						<li>
							<input type="button" name="" id="" value="注册" class="sub" onclick="check()"/>
						</li>
					</ul>
				</div>
			</div>
			<div class="foot">
				<p> XXXX | XXXX | XXXX | XXXX | XXXX | </p>
				<p>地址：华北水利水电大学 邮编：123456手机：13527314567</p>
			</div>
		</div>
</body>
</html>